home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / xcmd / sprtxtrn.sea / Support Tools eXternals 1.2.5 / card_40171.txt < prev    next >
Text File  |  1990-11-13  |  4KB  |  152 lines

  1. -- card: 40171 from stack: in.5
  2. -- bmap block id: 11473
  3. -- flags: 0000
  4. -- background id: 3858
  5. -- name: SCSIInfo
  6. ----- HyperTalk script -----
  7. on CloseCard
  8.   put empty into cd fld "ids"
  9.   put empty into cd fld "SCSI list"
  10.   pass CloseCard
  11. end CloseCard
  12.  
  13. on HideObjects
  14.   hide cd fld "label"
  15.   hide cd fld "SCSI list"
  16.   hide cd fld "ids"
  17.   hide cd btn "try it!"
  18. end HideObjects
  19.  
  20. on ShowObjects
  21.   show cd fld "label"
  22.   show cd fld "SCSI list"
  23.   show cd fld "ids"
  24.   show cd btn "try it!"
  25. end ShowObjects
  26.  
  27.  
  28. -- part 4 (field)
  29. -- low flags: 00
  30. -- high flags: 0000
  31. -- rect: left=7 top=103 right=119 bottom=238
  32. -- title width / last selected line: 0
  33. -- icon id / first selected line: 0 / 0
  34. -- text alignment: 0
  35. -- font id: 3
  36. -- text size: 10
  37. -- style flags: 256
  38. -- line height: 13
  39. -- part name: label
  40.  
  41.  
  42. -- part 2 (button)
  43. -- low flags: 00
  44. -- high flags: A002
  45. -- rect: left=82 top=292 right=326 bottom=175
  46. -- title width / last selected line: 0
  47. -- icon id / first selected line: 0 / 0
  48. -- text alignment: 1
  49. -- font id: 0
  50. -- text size: 12
  51. -- style flags: 8192
  52. -- line height: 16
  53. -- part name: Try It!
  54. ----- HyperTalk script -----
  55. on mouseUp
  56.   global errGlobal
  57.   put empty into cd fld "SCSI list"
  58.   put return into cd fld "ids"
  59.   set the scroll of cd fld "SCSI list" to 0
  60.   set the scroll of cd fld "ids" to 0
  61.   repeat with idNdx = 0 to 6
  62.     put SCSIInfo(idNdx, "noDialog:errGlobal") into SCSIdata
  63.     if errGlobal Γëá empty then
  64.       answer "Error:" && errGlobal
  65.       put empty into errGlobal
  66.     else if SCSIdata Γëá empty then
  67.       put SCSIdata & return & return after cd fld "SCSI list"
  68.       put idNdx & return & return & return & return & return after cd fld "ids"
  69.     end if
  70.   end repeat
  71. end mouseUp
  72.  
  73.  
  74.  
  75.  
  76. -- part 3 (field)
  77. -- low flags: 00
  78. -- high flags: 0007
  79. -- rect: left=11 top=117 right=288 bottom=67
  80. -- title width / last selected line: 0
  81. -- icon id / first selected line: 0 / 0
  82. -- text alignment: 1
  83. -- font id: 3
  84. -- text size: 9
  85. -- style flags: 256
  86. -- line height: 12
  87. -- part name: ids
  88. ----- HyperTalk script -----
  89. on mouseEnter
  90.   set the scroll of cd fld "scsi list" to the scroll of me
  91. end mouseEnter
  92.  
  93. on mouseWithin
  94.   set the scroll of cd fld "scsi list" to the scroll of me
  95. end mouseWithin
  96.  
  97. on mouseLeave
  98.   if the short name of this cd Γëá "SCSIInfo" then exit mouseLeave
  99.   set the scroll of cd fld "scsi list" to the scroll of me
  100. end mouseLeave
  101.  
  102.  
  103.  
  104. -- part 1 (field)
  105. -- low flags: 00
  106. -- high flags: 0007
  107. -- rect: left=50 top=117 right=288 bottom=254
  108. -- title width / last selected line: 0
  109. -- icon id / first selected line: 0 / 0
  110. -- text alignment: 0
  111. -- font id: 4
  112. -- text size: 9
  113. -- style flags: 0
  114. -- line height: 12
  115. -- part name: SCSI list
  116. ----- HyperTalk script -----
  117. on mouseEnter
  118.   set the scroll of cd fld "ids" to the scroll of me
  119. end mouseEnter
  120.  
  121. on mouseWithin
  122.   set the scroll of cd fld "ids" to the scroll of me
  123. end mouseWithin
  124.  
  125. on mouseLeave
  126.   if the short name of this cd Γëá "SCSIInfo" then exit mouseLeave
  127.   set the scroll of cd fld "ids" to the scroll of me
  128. end mouseLeave
  129.  
  130.  
  131.  
  132. -- part contents for background part 38
  133. ----- text -----
  134. 39/50
  135.  
  136. -- part contents for card part 4
  137. ----- text -----
  138. SCSI ID    SCSI Drive Info
  139.  
  140. -- part contents for background part 20
  141. ----- text -----
  142. SCSIInfo - An XFCN to return information about a specified SCSI device.
  143.  
  144. SCSIInfo(SCSI Address, ┬½"noDialog:"errorGlobal┬╗)
  145.  
  146. This XFCN is similar to the SCSI Probe CDEV by Robert Polic.  It returns the type, vendor, product name, and driver version number stored by the controller in the device.  As a caveat, just because you bought a particular device from a certain company does NOT mean that their name should appear on line 2 of the result.  As is so common in this industry, companies often buy parts and put their own label on the product.  Every 45MB removable cartridge drive I have come across has Syquest as the vendor, not the company that sells the drive.
  147.  
  148. Result:Line 1 contains type of SCSI device
  149. Line 2 contains Vendor Name
  150. Line 3 contains Product Name
  151. Line 4 contains driver version number
  152.